﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;

namespace PSGQuickTimeTracker
{
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main()
		{
			bool _isFirstInstance;

			using (Mutex mtx = new Mutex(true, "PSG Quick Time Tracker", out _isFirstInstance))
			{
				if (_isFirstInstance)
				{
					Application.EnableVisualStyles();
					Application.SetCompatibleTextRenderingDefault(false);
					Application.Run(new MainWindow());
				}
				else
				{					
					MessageBox.Show("An instance of the " + Application.ProductName + " is already running!");
				}
			}			
		}
	}
}
